﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Dycox.Windows.Forms
{
    internal static class FormsHelper
    {
        public static Control GetActiveControl(this ContainerControl from)
        {
            Control ctl = from.ActiveControl;

            while (ctl is ContainerControl)
                ctl = ((ContainerControl)ctl).ActiveControl;

            return ctl;
        }
    }
}
